home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / NetHack 3.1.3 / source / include / mttypriv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-01  |  1.3 KB  |  61 lines  |  [TEXT/R*ch]

  1. /*    SCCS Id: @(#)mttypriv.h    3.1    93/03/01            */
  2. /* Copyright (c) Jon W{tte 1993.                    */
  3. /* NetHack may be freely redistributed.  See license for details.    */
  4.  
  5. /*
  6.  * This file contains private structures used to implement the
  7.  * tty windows - note that these structures may change between
  8.  * minor releases!
  9.  */
  10.  
  11. #ifndef _H_tty_private
  12. # define _H_tty_private
  13.  
  14. # ifndef _H_tty_public
  15. #  include "mactty.h"
  16. # endif
  17.  
  18. #define TA_TO_RGB(ta,rgb) (((rgb).red=(((ta)>>16)&0xff)*257),((rgb).green=(((ta)>>8)&0xff)*257),\
  19.     ((rgb).blue=((ta)&0xff)*257)),rgb
  20.  
  21. typedef struct tty_record {
  22.     void                * not_used ;
  23.     WindowPtr            its_window ;
  24.     GWorldPtr            its_window_world ;
  25.     BitMap                its_bits ;
  26.     GrafPtr                offscreen_port ;
  27.     GWorldPtr            offscreen_world ;
  28. #if CLIP_RECT_ONLY
  29.     Rect                invalid_rect ;
  30. #else
  31.     RgnHandle            invalid_part ;
  32. #endif
  33.  
  34.     short                font_number ;
  35.     short                font_size ;
  36.     short                char_width ;
  37.     short                row_height ;
  38.     short                ascent_height ;
  39.  
  40.     short                x_size ;
  41.     short                y_size ;
  42.     short                x_curs ;
  43.     short                y_curs ;
  44.  
  45.     long                attribute [ TTY_NUMBER_ATTRIBUTES ] ;
  46.     long                last_cursor ;
  47.  
  48. #if TTY_INPUT
  49.     short                input_buffer_len ;
  50.     short                input_buffer_limit ;
  51.     char                * input_buffer ;
  52. #endif
  53.  
  54.     Boolean                was_allocated ;
  55.     Boolean                curs_state ;
  56.     Boolean                uses_gworld ;
  57. } tty_record ;
  58.  
  59.  
  60. #endif
  61.